package com.schoolcloud.common.exception.handle;

import com.schoolcloud.common.exception.FileUploadException;
import com.schoolcloud.common.model.R;
import org.springframework.web.bind.annotation.ControllerAdvice;
import org.springframework.web.bind.annotation.ExceptionHandler;

@ControllerAdvice
public class GlobalExceptionHandle {
    @ExceptionHandler(FileUploadException.class)
    public R<?> handleFileUploadException(FileUploadException e) {
        return R.err(e.getMessage());
    }
}
